Construction of Systems Software Using Specifications of Procedure Calling Conventions
نویسندگان
چکیده
The procedure calling convention impacts the operation of many system software components. The interface between procedures, which is established by the calling convention, facilitates separate compilation of program modules and interoperability of programming languages. The procedure calling convention dictates the way that program values are communicated, and how machine resources are shared between a procedure making a call (the caller) and the procedure being called (the callee). What makes calling conventions unique and interesting is that they are not implementation dependent or entirely language dependent. Instead, the calling convention is machinedependent because the rules for passing values from one procedure to another depend on machine-specific features such as memory alignment restrictions and register usage conventions. Further, code that implements the calling convention must be generated by the compiler and understood by other systems software. Applications, such as compilers and debuggers, which generate, or process procedures at the machine-language abstraction level require knowledge of the procedure calling convention. Currently, applications that process procedures implement conventions in an ad-hoc manner. The resulting code is complicated with details, difficult to maintain, and often plagued with errors. In this paper, we describe the only known formal model and specification language for procedure calling conventions. The model and language, in combination, facilitate the accurate specification of conventions that can be shown to be both consistent and complete. Further, we show how the convention specifications can be used to automatically generate that part of the code generator responsible for generating procedure calls. Finally, we discuss a new compiler testing technique that uses the specifications to further close the gap between actual compiler implementations and correct compilers. The technique, which uses a target-sensitive test suite generator, has exposed and diagnosed faults in several C compilers.
منابع مشابه
Automatic Detection and Diagnosis of Faults in Generated Code for Procedure Calls
In this paper, we present a compiler testing technique that closes the gap between existing compiler implementations and correct compilers. Using formal specifications of procedure-calling conventions, we have built a target-sensitive test suite generator that builds test cases for a specific aspect of compiler code generators: the procedure-calling sequence generator. By exercising compilers w...
متن کاملA Formal Model and Specification Language for Procedure Calling Conventions 1
Procedure calling conventions are used to provide uniform procedure call interfaces. Applications, such as compilers and debug-gers, which generate, or process procedures at the machine-language abstraction level require knowledge of the calling convention. In this paper, we develop a formal model for procedure calling conventions called P-FSA's. Using this model, we are able to ensure several ...
متن کاملStaged Allocation: Engineering the Specification and Implementation of Procedure Calling Conventions
We present staged allocation, a new technique for specifying calling conventions. A specification written using staged allocation has a precise, formal semantics, and it can be executed directly inside a compiler. An implementation takes about 250 lines of ML or 650 lines of C++. Descriptions of nine calling conventions range in size from 15 to 30 lines each.
متن کاملModeling Class Operations in B: Application to UML Behavioral Diagrams
An appropriate approach for translating UML to B formal specifications allows one to use UML and B jointly in an unified, practical and rigorous software development. We formally analyze UML specifications via their corresponding B formal specifications. This point is significant because B support tools like AtelierB are available. We can also use UML specifications as a tool for building B spe...
متن کاملReliability Assessment of Shallow Domes Using a Semi-Empirical Evaluation Procedure
Like other structures, shallow domes have imperfections from the prescribed values obtained by specifications during the construction process. Specifications define some tolerance values for imperfections. Despite consideration of these values, the critical load of a dome varies for each imperfection pattern. So the reliability plays an important role in domes safety. Theoretical evaluation pro...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1988